package main

import "fmt"
type address struct {
	sheng,shi string
}
type Book struct {
	BookName string
	price float64
}

type person struct {
	name string
	age int
	book Book
	address address
}
func main()  {
	b1:=Book{}
	b1.BookName="金瓶梅"
	b1.price=35.7
	fmt.Println(b1)
	 p1:=person{}
	 p1.name="王二狗"
	 p1.age=20
	 p1.book=b1
	 fmt.Println(p1)

	 b2:=Book{"十万个为什么",68.9}
	 p2:=person{"老王",23,b2,address{}}
	 fmt.Println(p2)

	 p3:=person{
	 	name:"李小花",
	 	age:34,
	 	book:Book{
	 		BookName:"天龙八部",
	 		price:45.44,
		},
	 }
	 fmt.Println(p3)
	 p4:=person{}
	 p4.name="bushi"
	 p4.age=56
	 p4.book=Book{
	 	BookName:"红楼梦",
	 	price:20.7,
	 }
	 fmt.Println(p4)

		p5:=person{}
		p5.name="naveen"
		p5.age=50
		p5.address=address{
			sheng:"吉林省",
			shi:"延吉市",
		}
		fmt.Println(p5)
}
